<!-- 这是Login.vue -->
<template>
    <form>
        账号<input>
        密码<input>
        <button @click="login">登录</button>
        <button @click="register">注册</button>
    </form>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';
import { onMounted } from 'vue';
const router=useRouter()

function login(){
    //这里需要访问后台，账号和密码验证成功后才能登录成功
    router.push('/show')
}

function register(){
  router.push({
    path:"/register"
  })
}

</script>
<style scoped>
</style>